package initalize

import "go.uber.org/zap"

// NewDevelopment 设置打印日志的位置
func NewDevelopment() (*zap.Logger, error) {
	config := zap.NewDevelopmentConfig()
	//config.OutputPaths = []string{
	//	"log.log",
	//}
	return config.Build()
}

// InitZap 初始化nacos
func InitZap() {
	logger, err := NewDevelopment()
	if err != nil {
		zap.S().Error("zap初始化失败！", err.Error())
		return
	}

	zap.ReplaceGlobals(logger)

	defer logger.Sync()
}
